﻿<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta http-equiv="cache-control" content="no-cache">
	<title>图书管理</title>
	<link rel="stylesheet" type="text/css" href="../../plugins/jquery-easyui/themes/metro/easyui.css" />
	<link rel="stylesheet" type="text/css" href="../../plugins/jquery-easyui/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="../../css/common/common.css" />
	<script type="text/javascript" src="../../plugins/jquery-easyui/jquery.min.js"></script>
	<script type="text/javascript" src="../../plugins/jquery-easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../../plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../../plugins/jquery-easyui/datagrid-detailview.js"></script>
	<script type="text/javascript" src="../../js/common/common.js"></script>
	<script type="text/javascript" src="../../js/bookManage/bookManage.js"></script>
</head>
<body>
	<!-- 工具栏 -->
	<div id="book-tb">
		<c:if test="${sessionScope.authority != 0 }">
			<div>
				<a href="javaScript:void(0);" onclick="BI.book.obj.insert('新书登记', BI.book.dlg.insertRule)" class="easyui-linkbutton" data-options="iconCls:'icon-ex-bookadd', plain:'true'">新书登记</a>
				<a href="javaScript:void(0);" onclick="BI.publisher.obj.showDlg()" class="easyui-linkbutton" data-options="iconCls:'icon-ex-bookmark', plain:'true'">出版社编辑</a>
				<a href="javaScript:void(0);" onclick="BI.category.obj.showDlg()" class="easyui-linkbutton" data-options="iconCls:'icon-ex-bookopen', plain:'true'">图书类型编辑</a>
			</div>
		</c:if>
		<form class="super-search">
			<div class="input-box">
				<div>
					<label>书名：</label>
					<input type="text" class="easyui-textbox" name="s_name" data-options="prompt:'书名'"/>
				</div>
				<div>
					<label>作者：</label>
					<input type="text" class="easyui-textbox" name="s_author" data-options="prompt:'作者'"/>
				</div>
				<div>
					<label>出版社：</label>
					<input type="text" class="easyui-combobox" id="s_publisherId" name="s_publisherId" data-options="prompt:'选择出版社'" />
				</div>
				<div>
					<label>类型：</label>
					<input type="text" class="easyui-combobox" id="s_categoryId" name="s_categoryId" data-options="prompt:'选择类型'" />
				</div>
				<div class="input-time">
					<label>出版时间：</label>
					<input type="text" class="easyui-datebox" name="start_time" data-options="prompt:'起始时间'"/>&nbsp;&nbsp;-&nbsp;&nbsp;
					<input type="text" class="easyui-datebox" name="end_time" data-options="prompt:'结束时间'"/>
				</div>
			</div>
			<div class="search-box">
				<a href="javaScript:void(0);" onclick="BI.book.obj.query()" class="easyui-linkbutton" data-options="iconCls:'icon-search',">查询</a>
				<a href="javaScript:void(0);" onclick="BI.book.obj.reset()" class="easyui-linkbutton" data-options="iconCls:'icon-reload'," >重置</a>
			</div>
		</form>
	</div>

	<!-- 图书表单 -->
	<div id="book-dlg" class="easyui-dialog" data-options="iconCls:'icon-add', buttons:'#book-btn', closed:'true', modal:'true'" >   
		<form method="post" >   
		    <div class="fitem">   
		        <label class="wd-60">书名:</label>   
		        <input type="text" class="easyui-textbox" data-options="prompt:'书名'" name="name" required="required" />   
		    </div>   
		    <div class="fitem">   
		        <label class="wd-60">作者:</label>   
		        <input type="text" class="easyui-textbox" data-options="prompt:'作者'" name="author" required="required" />   
		    </div>
		    <div class="fitem">   
		        <label class="wd-60">出版社:</label>   
				<input type="text" class="easyui-combobox" id="publisherId" name="publisherId" required="required" data-options="prompt:'选择出版社'" />
		    </div>
		    <div class="fitem">   
		        <label class="wd-60">类型:</label>   
				<input type="text" class="easyui-combobox" id="categoryId" name="categoryId" required="required" data-options="prompt:'选择类型'" />
		    </div>
		    <div class="fitem">   
		        <label class="wd-60">ISBN:</label>   
		        <input type="text" class="easyui-textbox" id="ISBN" name="ISBN" data-options="missingMessage:'ISBM编码', validType:'ISBMValidate'," required="required" />   
		    </div>
		    <div class="fitem" id="publishDate">   
		        <label class="wd-60">出版时间:</label>   
		        <input type="text" class="easyui-datebox" name="publishDate" data-options="prompt:'出版时间'" required="required" />   
		    </div>
		    <div class="fitem">   
		        <label class="wd-60">单价:</label>   
		        <input type="text" class="easyui-numberbox" name="price" data-options="precision:2,groupSeparator:',',decimalSeparator:'.',prefix:'￥',prompt:'单价'" required="required" />   
		    </div>
		    <div class="fitem" id="booksNum">   
		        <label class="wd-60">数量:</label>   
				<input type="text" class="easyui-numberspinner" value="1" name="booksNum" data-options="min:1,max:1000," /> 
		    </div>
		    
		    <input type="hidden" name="id" />
		</form>  
	</div>
	<div id="book-btn">
		<a id="sureBtn" href="javaScript:void(0);" class="easyui-linkbutton" onclick="BI.book.obj.save()" data-options="iconCls:'icon-ok', plain:'true'">确定</a>
		<a id="cancelBtn" href="javaScript:void(0);" class="easyui-linkbutton" onclick="javascritp:$('#book-dlg').dialog('close');" data-options="iconCls:'icon-cancel', plain:'true'">取消</a>
	</div>
		
	<!-- 图书信息表格 -->
	<table id="book-dg"></table>
	
	<!-- 出版社表格 -->
	<div id="publisher-dlg" class="easyui-dialog" data-options="iconCls:'icon-add', closed:'true', modal:'true'" >
		<div id="publisher-tb">
			<a href="javascript:BI.publisher.obj.insert()" class="easyui-linkbutton" data-options="iconCls:'icon-search', plain:'true'">新增</a>
		</div>
		<table id="publisher-dg"></table>
	</div>
	
	<!-- 图书类型表格 -->
	<div id="category-dlg" class="easyui-dialog" data-options="iconCls:'icon-add', closed:'true', modal:'true'" >
		<div id="category-tb">
			<a href="javascript:BI.category.obj.insert()" class="easyui-linkbutton" data-options="iconCls:'icon-search', plain:'true'">新增</a>
		</div>
		<table id="category-dg"></table>
	</div>
	
</body>
</html>